1. Field of the Invention
The present invention relates to a semiconductor device and a method for driving the semiconductor device.
2. Description of the Related Art
Signal processing circuits such as central processing units (CPUs) vary in configuration depending on the intended use. A signal processing circuit generally has a main memory for storing data or program and other memory units such as a register and a cache memory. A register has a function of temporarily holding data for carrying out arithmetic processing, holding a program execution state, or the like. In addition, a cache memory is located between an arithmetic circuit and a main memory in order to reduce access to the main memory and speed up the arithmetic processing.
A memory device such as a register or a cache memory needs to write data at higher speed than a main memory. For this reason, in general, a flip-flop circuit or the like is used as a register, while a static random access memory (SRAM) or the like is used as a cache memory. In other words, a volatile memory circuit is used as such a register, a cache memory, or the like. Data in the volatile memory is lost when supply of a power supply voltage is stopped.
In order to reduce power consumption, a method for temporarily stopping supply of a power supply voltage to a signal processing circuit in a period during which data is not input and output has been suggested. In the method, a nonvolatile memory device is located in the periphery of a volatile memory device such as a register or a cache memory, so that the data is temporarily stored in the nonvolatile memory device. Thus, data stored in the register, the cache memory, or the like can be held even while supply of power supply voltage is stopped in the signal processing circuit (for example, see Patent Document 1).
In addition, in the case where supply of a power supply voltage is stopped for a long time in a signal processing circuit, data in a volatile memory device is transferred to an external memory device such as a hard disk or a flash memory before the supply of the power supply voltage is stopped, so that the data can be prevented from being lost.